<!DOCTYPE html>
<html lang="zh" xmlns:th="https://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增菜单')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-func">
        <input id="id" name="id" type="hidden" th:value="${func.id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">菜单名称：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="funcName" id="funcName"  th:value="${func.funcName}" required>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script>
    var prefix = ctx + "king/func";

    $("#form-func").validate({
        rules: {
            funcName: {
            	required: true,
            	maxlength: 10
            }
        },
        messages: {
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-func').serialize());
        }
    }

    $(function () {

    });

</script>
</body>
</html>
